import java.io.File;
import java.io.IOException;

public class Demo8 {
    public static void main(String[] args) throws IOException {
        File file = new File("./some-parent");
        File dest = new File("./some-dir");
        System.out.println(file.getCanonicalPath());
        System.out.println(dest.exists());
        System.out.println(file.renameTo(dest));
        System.out.println(dest.getCanonicalPath());
        System.out.println(dest.exists());
    }
}
